package entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class Questions implements Serializable {

    private Number accepted_answer_id;
    private Number answer_count;
    private boolean community_owned;
    private Number creation_date;
    private Number down_vote_count;
    private Number favorite_count;
    private Number last_activity_date;
    private Number last_edit_date;
    private Owner owner;
    private String question_answers_url;
    private String question_comments_url;
    private Number question_id;
    private String question_timeline_url;
    private Number score;
    private List tags;
    private String title;
    private Number up_vote_count;
    private Number view_count;
    
    private String questionLink;
    private String creationDate;

    public Number getAccepted_answer_id() {
        return this.accepted_answer_id;
    }

    public void setAccepted_answer_id(Number accepted_answer_id) {
        this.accepted_answer_id = accepted_answer_id;
    }

    public Number getAnswer_count() {
        return this.answer_count;
    }

    public void setAnswer_count(Number answer_count) {
        this.answer_count = answer_count;
    }

    public boolean getCommunity_owned() {
        return this.community_owned;
    }

    public void setCommunity_owned(boolean community_owned) {
        this.community_owned = community_owned;
    }

    public Number getCreation_date() {
        return this.creation_date;
    }

    public void setCreation_date(Number creation_date) {
        this.creation_date = creation_date;
    }

    public Number getDown_vote_count() {
        return this.down_vote_count;
    }

    public void setDown_vote_count(Number down_vote_count) {
        this.down_vote_count = down_vote_count;
    }

    public Number getFavorite_count() {
        return this.favorite_count;
    }

    public void setFavorite_count(Number favorite_count) {
        this.favorite_count = favorite_count;
    }

    public Number getLast_activity_date() {
        return this.last_activity_date;
    }

    public void setLast_activity_date(Number last_activity_date) {
        this.last_activity_date = last_activity_date;
    }

    public Owner getOwner() {
        return this.owner;
    }

    public void setOwner(Owner owner) {
        this.owner = owner;
    }

    public String getQuestion_answers_url() {
        return this.question_answers_url;
    }

    public void setQuestion_answers_url(String question_answers_url) {
        this.question_answers_url = question_answers_url;
    }

    public String getQuestion_comments_url() {
        return this.question_comments_url;
    }

    public void setQuestion_comments_url(String question_comments_url) {
        this.question_comments_url = question_comments_url;
    }

    public Number getQuestion_id() {
        return this.question_id;
    }

    public void setQuestion_id(Number question_id) {
        this.question_id = question_id;
    }

    public String getQuestion_timeline_url() {
        return this.question_timeline_url;
    }

    public void setQuestion_timeline_url(String question_timeline_url) {
        this.question_timeline_url = question_timeline_url;
    }

    public Number getScore() {
        return this.score;
    }

    public void setScore(Number score) {
        this.score = score;
    }

    public List getTags() {
        return this.tags;
    }

    public void setTags(List tags) {
        this.tags = tags;
    }

    public String getTitle() {
        return this.title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Number getUp_vote_count() {
        return this.up_vote_count;
    }

    public void setUp_vote_count(Number up_vote_count) {
        this.up_vote_count = up_vote_count;
    }

    public Number getView_count() {
        return this.view_count;
    }

    public void setView_count(Number view_count) {
        this.view_count = view_count;
    }

    public String getQuestionLink() {
        questionLink = "http://stackoverflow.com/questions/" + getQuestion_id();
        return questionLink;
    }

    public String getCreationDate() {  
        creationDate = (new Date(getCreation_date().longValue())).toString();
        return creationDate;
    }

    public void setCreationDate(String creationDate) {
        this.creationDate = creationDate;
    }

    public void setQuestionLink(String questionLink) {
        this.questionLink = questionLink;
    }

    public Number getLast_edit_date() {
        return last_edit_date;
    }

    public void setLast_edit_date(Number last_edit_date) {
        this.last_edit_date = last_edit_date;
    }

    @Override
    public String toString() {
        return "Questions{" + "accepted_answer_id=" + accepted_answer_id + ", answer_count=" + answer_count + ", community_owned=" + community_owned + ", creation_date=" + creation_date + ", down_vote_count=" + down_vote_count + ", favorite_count=" + favorite_count + ", last_activity_date=" + last_activity_date + ", question_answers_url=" + question_answers_url + ", question_comments_url=" + question_comments_url + ", question_id=" + question_id + ", question_timeline_url=" + question_timeline_url + ", score=" + score + ", tags=" + tags + ", title=" + title + ", up_vote_count=" + up_vote_count + ", view_count=" + view_count + ", questionLink=" + questionLink + ", creationDate=" + creationDate + '}';
    }
    
}
